<div class="sf_admin_list">
    <?php if (!$pager->getNbResults()): ?>
        <p><?php echo __('No results', array(), 'tmcTwitterBootstrapPlugin') ?></p>
    <?php else: ?>

    <?php $results = $pager->getResults()->getRawValue() ?>
    <?php $modelname = get_class($results[0]) ?>

    <table class="datatable table table-bordered table-striped" id="table_vg_business_category" style="margin-top: 5px !important;">
        <thead>
            <tr>
                            <th id="sf_admin_list_batch_actions"><input id="sf_admin_list_batch_checkbox" type="checkbox" onclick="checkAll();" /></th>
            
            <?php include_partial('vgBusinessCategory/list_th_tabular', array('sort' => $sort)) ?>

                            <th id="sf_admin_list_th_actions"><?php echo __('Actions', array(), 'sf_admin') ?></th>
                        </tr>
        </thead>
      <tfoot>
        <tr>
          <th colspan="5">
            <?php if ($pager->haveToPaginate()): ?>
            <div style="position: relative; width: auto; float:right"><?php include_partial('vgBusinessCategory/pagination', array('pager' => $pager)) ?></div>
            <?php slot('pagination_extra') ?>
              <?php echo __('(page %%page%%/%%nb_pages%%)', array('%%page%%' => $pager->getPage(), '%%nb_pages%%' => $pager->getLastPage()), 'tmcTwitterBootstrapPlugin') ?>
            <?php end_slot() ?>
            <?php endif; ?>
            <div style="float: left;font-weight: bold;line-height: 34px;margin-left: 10px;position: relative;width: auto;">
                <?php echo format_number_choice('[0] 0 kết qủa|[1] 1 kết qủa|(1,+Inf] %1% kết qủa', array('%1%' => $pager->getNbResults()), $pager->getNbResults(), 'tmcTwitterBootstrapPlugin') ?>
                <?php include_slot('pagination_extra') ?>
            </div>
          </th>
        </tr>
      </tfoot>
      <tbody>
        <?php foreach ($results as $i => $vg_business_category): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?>
          <tr class="sf_admin_row <?php echo $odd ?>" rel="<?php echo $vg_business_category->getId() ?>">
                            <?php include_partial('vgBusinessCategory/list_td_batch_actions', array('vg_business_category' => $vg_business_category, 'helper' => $helper)) ?>
                            <?php include_partial('vgBusinessCategory/list_td_tabular', array('vg_business_category' => $vg_business_category)) ?>
                            <?php include_partial('vgBusinessCategory/list_td_actions', array('vg_business_category' => $vg_business_category, 'helper' => $helper)) ?>
                      </tr>
        <?php endforeach; ?>
      </tbody>
    </table>
  <?php endif; ?>
</div>
<script type="text/javascript">
/* <![CDATA[ */
function checkAll()
{
  var boxes = document.getElementsByTagName('input'); for(var index = 0; index < boxes.length; index++) { box = boxes[index]; if (box.type == 'checkbox' && box.className == 'sf_admin_batch_checkbox') box.checked = document.getElementById('sf_admin_list_batch_checkbox').checked } return true;
}
/* ]]> */
</script>